package com.feihong.yw189.utils;

import android.graphics.Bitmap;
import android.util.Log;
import android.webkit.WebResourceError;
import android.webkit.WebResourceRequest;
import android.webkit.WebView;
import android.webkit.WebViewClient;

/**
 * @author wangziheng
 * @name Android
 * @class name：com.feihong.yw189.utils
 * @class describe:
 * @time 2018/3/1 16:31
 * @change
 * @chang time
 * @class describe
 */
public abstract class WebViewClientRToken extends WebViewClient {

    @Deprecated
    @Override
    public boolean shouldOverrideUrlLoading(WebView view, String url) {
        Log.e("WebViewClientRToken", "shouldOverrideUrlLoading111: " + url);
        return super.shouldOverrideUrlLoading(view, url);
    }

    @Override
    public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) {
        return super.shouldOverrideUrlLoading(view, request);
    }
    @Override
    public void onPageStarted(WebView view, String url, Bitmap favicon) {
        super.onPageStarted(view, url, favicon);
    }


    @Override
    public void onPageFinished(WebView view, String url) {
        super.onPageFinished(view, url);
    }

    @Override
    public void onReceivedError(WebView view, WebResourceRequest request, WebResourceError error) {
        if (view == null || request == null || error == null) {
            return;
        }
        super.onReceivedError(view, request, error);
    }

    @Deprecated
    @Override
    public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
        if (view == null || description == null || failingUrl == null) {
            return;
        }
        super.onReceivedError(view, errorCode, description, failingUrl);
    }
}
